package methodReference;

public class Student {

    private int score;
    private String name;


    public Student(int score, String name) {
        this.score = score;
        this.name = name;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public static int comepareStudentByScoue(Student student1, Student student2) {
        return student1.getScore() - student2.getScore();
    }

    public static int comepareStudentByName(Student student1, Student student2) {
        return student1.getName().compareToIgnoreCase(student2.getName());
    }

    public int compareStudentScore(Student student) {
        return this.getScore() - student.getScore();
    }

    public int compareStudentName(Student student) {
        return this.getName().compareToIgnoreCase(student.getName());
    }
}
